#include <stdio.h>

static const int MAX_N = 500000;
int record[MAX_N];

void init()
{
	record[0] = 0;
	int* current = record + 1;
	for (int n = 2; n <= MAX_N; n++)
	{
		*current = 1;
		int a;
		for (a = 2; a * a < n; a++)
		{
			if (n % a == 0)
				*current += a + n / a;
		}
		if (a * a == n)
			*current += a;
		current++;
	}
}

int main()
{
	init();
	int t;
	scanf ("%d", &t);
	while (t--)
	{
		int n;
		scanf ("%d", &n);
		printf ("%d\n", record[n - 1]);
	}
	return 0;
}